﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Npgsql;

namespace IonosphereViewer
{
    public partial class Site1 : System.Web.UI.MasterPage
    {
        //--------------------------------------------------------------------------
        protected void Page_Load(object sender, EventArgs e)
        {
            this.Error += new EventHandler(_Default_Error);
        }
        //--------------------------------------------------------------------------
        void _Default_Error(object sender, EventArgs e)
        {
            Response.Clear();
            Response.Write("Page Error!<br />");
            Response.Write(string.Format("Error: <b>{0}</b>", Server.GetLastError().Message));
            Server.ClearError();
        }
        //--------------------------------------------------------------------------
        protected void RadMenu_ItemClick(object sender, Telerik.Web.UI.RadMenuEventArgs e)
        {
            if ((sender is Telerik.Web.UI.RadMenu) &&
                (sender != null))
            {
                switch ((sender as Telerik.Web.UI.RadMenu).SelectedValue)
                {
                    case "snew":
                        {
                            Server.Transfer("~/SFiles.aspx");
                            break;
                        }
                    case "sfile":
                        {
                            Server.Transfer("~/SFilesNew.aspx");
                            break;
                        }
                    case "vfile":
                        {
                            Server.Transfer("~/VFiles.aspx");
                            break;
                        }
                    case "ion":
                        {
                            Server.Transfer("~/Ionogramma.aspx");
                            break;
                        }
                    case "exit":
                        {
                            Server.Transfer("~/Login.aspx");
                            break;
                        }
                    default:
                        break;
                }
            }

        }
        //--------------------------------------------------------------------------
    }
}
